﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Conventions;
using App.Core.Entities;

namespace App.Core.Data
{
    public class AppDbContext : DbContext
    {
        public AppDbContext(DbContextOptions<AppDbContext> options)
            : base(options)
        {


        }

        protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
        {
            //停用表名复数的Convention
            //configurationBuilder.Conventions.Remove(typeof(TableNameFromDbSetConvention));
        }

        public DbSet<User> Users { get; set; }
    }
}
